"tshark -T json"でエラー「tshark: Invalid -T parameter "json";」
原因
tsharkが古いから。
少なくとも以下のバージョンだとJSONに対応してないみたい。
TShark 1.12.8 (v1.12.8-0-g5b6e543 from master-1.12)
Wiresharkをアップデートすれば良い。以下に詳細。
エラー内容
以下のコマンドをたたくと、
$ tshark -nr a.pcap -T json
以下のエラーが出る。
code:エラー全文
tshark: Invalid -T parameter "json"; it must be one of:
"fields" The values of fields specified with the -e option, in a form
specified by the -E option.
"pdml" Packet Details Markup Language, an XML-based format for the
details of a decoded packet. This information is equivalent to
the packet details printed with the -V flag.
"ps" PostScript for a human-readable one-line summary of each of
the packets, or a multi-line view of the details of each of
the packets, depending on whether the -V flag was specified.
"psml" Packet Summary Markup Language, an XML-based format for the
summary information of a decoded packet. This information is
equivalent to the information shown in the one-line summary
printed by default.
"text" Text of a human-readable one-line summary of each of the
packets, or a multi-line view of the details of each of the
packets, depending on whether the -V flag was specified.
This is the default.
解決方法
更新後のtsharkのバージョンは以下。
TShark (Wireshark) 3.0.2 (v3.0.2-0-g621ed351d5c9)